import requests
import json

response = requests.get(
    "https://api.open-meteo.com/v1/forecast",
    params={
        "latitude": 51.5,
        "longitude": -0.11,
        "current": "temperature_2m"
    },
)

# print(response.headers)
# 打印 HTTP 响应结果中的 JSON 数据
# print(response.json())
data = response.json()  # 解析 JSON 响应
print(data)
print(json.dumps(data))

